using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using Microsoft.FSharp.Core;

namespace Cephei.Core
{
    /*
    /// <summary>
    /// Base class for a formula that can be inspected in a cell
    /// </summary>
    public interface ILinkable
    {
        /// <summary>
        /// If an empty cell has been replaced with a real value, all the calculators that are dependant on it
        /// need to be notified that they need to re-check that they are refering to the correct instance
        /// </summary>
        /// <param name="owner">the cell that own this formula, and can provide the subscription source</param>
        void Link (ICell owner);

    }
     * */
    /// <summary>
    /// Calculator objects implement this inteface for background recalculation.
    /// Func<> FastFunc<> Async<> & delegates have not been used because the interfaces
    /// change between versions, and all add an overhead
    /// </summary>
    /// <typeparam name="T">The type that is returned from the function call</typeparam>
    public interface IFormula<out T>    //: ILinkable
    {
        /// <summary>
        /// Perform the calculation on the current thread
        /// </summary>
        /// <param name="__u">the F# Unit object</param>
        /// <returns>value from calculation</returns>
        T Invoke (Unit __u);
    }
}
